package com.genius.adminmanager.user.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.genius.adminmanager.other.entity.ResponseJson;
import com.genius.adminmanager.user.service.UserService;
import com.genius.workflow.log.ControllerLog;

@Controller
public class ExportExcelController {
	@Autowired
    @Qualifier("userExportService")
    private UserService userExportService;
	/**
	 * 导出操作
	 * @param session
	 * @return
	 * @throws Exception
	 */
	@ControllerLog(description="导出用户")
	@PostMapping("/adminmanager/user/exportExcel")
	@ResponseBody
	public JSONObject exportExcel(HttpServletRequest request,HttpServletResponse responseServlet){
		JSONObject response = new JSONObject();
    	response.put(ResponseJson.code, 0);
    	response = userExportService.exportExcel(request, responseServlet, response);
		return response;
	}
}
